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AAAAAAAAAAAAAAAAAAAAA
-----END CERTIFICATE-----
"""
def level1(code: str):
    """
    对于只有一个helloworld的程序，可以直接搬运现有程序
    已经用c语言写好，远小于python版的
    """
    logging.info("level1")
    with open("dist/main.txt","w") as f:
        f.write(b64_of_helloworld)
    #breakpoint()    
    os.system("certutil -f -decode dist/main.txt dist/main.exe ")
    os.system("del /S main.txt")
    #src = "helloworld.exe"
    #shutil.copy2(src, "dist/main.exe")
